﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace LadyBugWeb.Page
{
    public partial class Inventory : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void LB_ProductName_Click(object sender, EventArgs e)
        {
            LinkButton f_myBut = (LinkButton)sender;
            GridViewRow f_gridRow = (GridViewRow)f_myBut.Parent.Parent;

            string f_productID = f_gridRow.Cells[0].Text;

            try
            {
                DetailsView1.AccessKey = f_productID;
            }
            catch (System.IndexOutOfRangeException exc)
            { //todo: alert the user here somthing went wrong
            }
        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {

        }
    }
}